<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件</title>
    <style>
        .div{
            width: 100px;
            height: 50px;
            background: #bfa;
        }
    </style>
</head>
<body>
<div class="div" onmouseover="onOver(this)" onmouseout="onOut(this)">你好！世界！
    <script>
        function onOver(ooj) {
            ooj.innerHTML="hello";
        }
        function onOut(ooj){
            ooj.innerHTML="world";
        }
    </script>
</div>
</body>
</html>